#include <stdio.h>
#include <stdlib.h>
#include <time.h>

int main(int argc,char* argv[])
{   
    char ch=0;
    unsigned int i=0,space=0,huanhang=0,others=0;
    printf("请输入字符:");
    for(i=1;i<2;i){
        scanf("%c",&ch);
        if(ch == '#'){
            break;
        }
        if(ch == ' '){
            space++;
        }
        else if(ch == '\n'){
            huanhang++;
        }       
        else{
            others++;
        }
    }
    printf("%c\n",ch);
    printf("有%u个空格\n",space);
    printf("有%u个换行符\n",huanhang);
    printf("有%u个其他字符\n",others);

    return 0;
}